package com.ftx.controller.test.spring.ext;

import com.ftx.controller.test.annotation.aop.BusinessClass;
import com.ftx.controller.test.annotation.aop.MainConfigOfAop;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Created by fengtingxin on 2020/6/2.
 */
public class IocTest_Ext {

    @Test
    public void testImport(){


        //使用有参构造器
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(ExtConfig.class);
        System.out.println("容器创建完成");
        String [] beanNames = applicationContext.getBeanDefinitionNames();
        for (String name : beanNames){
            System.out.println(name);
        }

    }
}
